//
//  ViewRoutes.swift
//  vaporRouting
//
//  Created by mac on 2017/11/4.
//

import Vapor

final class ViewRoutes: RouteCollection {
    let view: ViewRenderer
    init(_ view: ViewRenderer) {
        self.view = view
    }
    
    func build(_ builder: RouteBuilder) throws {
        /// GET /
        builder.get { req in
            return try self.view.make("index.html")
        }
    }
}
